package com.xayy.health.mgt.controller;

import com.xayy.health.mgt.service.FaultReportService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.net.UnknownHostException;

@RestController
@RequestMapping(value = "/faultReport")
@Api(tags = "故障上报")
public class FaultReportController {

    @Autowired
    private FaultReportService faultReportService;

    /**
     * 上传系统状态
     * 每10秒执行一次
     *
     * @return ResultBody
     */
    @ApiOperation(value = "上传系统状态")
//    @Scheduled(cron = "*/5 * * * * ?")
    public void pageList() throws UnknownHostException {
        faultReportService.progressStatus();
    }
}
